cmake_minimum_required(VERSION 2.6)
PROJECT(Base)

AUX_SOURCE_DIRECTORY(./ SRC_LIST1)
AUX_SOURCE_DIRECTORY(./base64 SRC_LIST2)
AUX_SOURCE_DIRECTORY(./md5 SRC_LIST3)
AUX_SOURCE_DIRECTORY(./sha1 SRC_LIST4)


SET(LIBRARY_OUTPUT_PATH ./)
#SET(EXECUTABLE_OUTPUT_PATH  ./bin)

ADD_DEFINITIONS( -g -W -Wall -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DAC_HAS_INFO
-DAC_HAS_WARNING -DAC_HAS_ERROR -DAC_HAS_CRITICAL -DTIXML_USE_STL
-DAC_HAS_DEBUG -DLINUX_DAEMON)

INCLUDE_DIRECTORIES(./ ./base64 ./md5 ./sha1)
LINK_DIRECTORIES(./ ./base64 ./md5 ./sha1)

ADD_LIBRARY(websocket STATIC ${SRC_LIST1}  ${SRC_LIST2}  ${SRC_LIST3}  ${SRC_LIST4})

#ADD_XXXX必须在TARGET_LINK_LIBRARIES前面，否则会报错
#ADD_LIBRARY(${PROJECTNAME} SHARED ${SRC_LIST})
#ADD_EXECUTABLE(${PROJECTNAME} ${SRC_LIST})

TARGET_LINK_LIBRARIES(websocket)
